<template>
	<view>
		<view class="">
			<image  src="https://oss.daccf.com/chjii12wgts2zgguh25rd/张丽/65d729f7-e241-4414-a354-5b096de38606.png" mode="widthFix"></image>
		</view>
		<view class="">
			请注意接收合同签署<text style="font-weight: 700;">短信</text>
		</view>
		<view class="">
			点击短信中合同签署链接进行电子签名
		</view>
		<view class="" style="padding-top: 200rpx;">
			<uv-button type="info" :custom-style="customStyle" disabled v-if='countdownText!=0'>已进行电子签名({{countdownText}})秒</uv-button>
			<uv-button type="primary" v-else @click="goPath">已进行电子签名</uv-button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				countdownSeconds: 30,
				      countdownIntervalId: null
			}
		},
		computed: {
		    countdownText() {
		      return `${this.countdownSeconds}`;
		    },
			customStyle() {
							return {
								background: '#999',
								color:'#fff'
							}
						}
		  },
		  methods: {
		    startCountdown() {
		      this.countdownIntervalId = setInterval(() => {
		        if (this.countdownSeconds > 0) {
		          this.countdownSeconds -= 1;
		        } else {
		          clearInterval(this.countdownIntervalId);
		          // 倒计时结束后的处理逻辑可在此处添加
		        }
		      }, 1000);
		    },
			goPath(){
				uni.reLaunch({
				    url:'/pages/index/performance/performance'
				});
			}
		  },
		  mounted() {
		    this.startCountdown();
			
		  },
	}
</script>

<style  lang="scss">
page{
	padding:250rpx 30rpx 0;
	text-align: center;
}
</style>
